package com.serialcommunication.constants;

import java.awt.Dimension;
import java.util.ArrayList;
import java.util.List;

public class GuiConfiguration {
	
	public static final Dimension WINDOW_SIZE = new Dimension(1200, 600);
	
	/*
	 * GENERAL PANEL CONFIGURATION
	 */
	public static final int PANEL_ELEMENT_PADDING_X = 8; // inside Panel: between Panel and Elements
	public static final int PANEL_ELEMENT_PADDING_Y = 2; // inside Panel: between Panel and Elements
	
	public static final int PANEL_PANEL_PADDING_X = 5; // between two panels of one engine
	public static final int PANEL_PANEL_PADDING_Y = 8; // between two panels of one engine
	
	public static final int PANEL_FIRST_Y = 40; // y-coordinate for first panel of each engine section
	public static final int PANEL_X_ENGINE_1 = 5; // x-coordinate for first panel of engine1 section
	public static final int PANEL_X_ENGINE_2 = 5; // x-coordinate for first panel of engine1 section  TO DO
	public static final int PANEL_X_ENGINE_3 = 5; // x-coordinate for first panel of engine1 section  TO DO
	
	/*
	 * PANELS SIZE
	 */
	public static final Dimension PANEL_LED_SIZE_3 = new Dimension(135, 25);
	public static final Dimension PANEL_LED_SIZE_8 = new Dimension(47, 47);
	
	public static final Dimension PANEL_BUTTON_SIZE_2 = new Dimension(205, 25);
	public static final Dimension PANEL_BUTTON_SIZE_3 = new Dimension(135, 25);
	
	public static final Dimension PANEL_READWRITETEXTFIELD_SIZE_1 = new Dimension(415, 67); // number defines how many panels of this size have to fit next to each other
	public static final Dimension PANEL_READWRITETEXTFIELD_SIZE_2 = new Dimension(205, 67);
	public static final Dimension PANEL_READWRITETEXTFIELD_SIZE_3 = new Dimension(135, 67);
	
	public static final Dimension PANEL_TEXTFIELDREADONLY_1 = new Dimension(135, 54);
	
	public static final Dimension PANEL_FIXVALUE_SIZE_2 = new Dimension(100, 55);
	
	/*
	 * ELEMENTS SIZE
	 */
	public static final Dimension LABEL_SIZE = new Dimension(80, 22); 
	public static final Dimension BUTTON_SIGN_SIZE = new Dimension(20, 22);
	public static final Dimension BUTTON_SNR_SIZE = new Dimension(30, 22);
	public static final Dimension BUTTON_CHANGEVALUE_SIZE = new Dimension(20, 22);
	public static final Dimension TEXTFIELD_SIZE_4 = new Dimension(45, 22); 
	public static final Dimension TEXTFIELD_SIZE_3 = new Dimension(60, 22); // number defines number of used payload bytes
	public static final Dimension TEXTFIELD_SIZE_2 = new Dimension(60, 22); 
	public static final Dimension SLIDER_SIZE = new Dimension(200, 15);
	
	/*
	 * FIXED VALUE LISTS
	 */
	public static final List<String> MOTION_CURRENT_VALUE_LIST = new ArrayList<String>();
	public static final List<String> HOLD_CURRENT_VALUE_LIST = new ArrayList<String>();
	public static final List<String> U_STEP_RESOLUTION_VALUE_LIST = new ArrayList<String>();
	public static final List<String> WAIT_TIME_VALUE_LIST = new ArrayList<String>();
	
	static {
		MOTION_CURRENT_VALUE_LIST.add("91"); // 91 183 274 365 457 548 639 731 822 913 1005 1096 1187 1279 1370 1461
		MOTION_CURRENT_VALUE_LIST.add("183");
		MOTION_CURRENT_VALUE_LIST.add("274");
		MOTION_CURRENT_VALUE_LIST.add("274");
		MOTION_CURRENT_VALUE_LIST.add("365");
		MOTION_CURRENT_VALUE_LIST.add("457");
		MOTION_CURRENT_VALUE_LIST.add("548");
		MOTION_CURRENT_VALUE_LIST.add("639");
		MOTION_CURRENT_VALUE_LIST.add("731");
		MOTION_CURRENT_VALUE_LIST.add("822");
		MOTION_CURRENT_VALUE_LIST.add("913");
		MOTION_CURRENT_VALUE_LIST.add("1005");
		MOTION_CURRENT_VALUE_LIST.add("1096");
		MOTION_CURRENT_VALUE_LIST.add("1279");
		MOTION_CURRENT_VALUE_LIST.add("1370");
		MOTION_CURRENT_VALUE_LIST.add("1461");

		HOLD_CURRENT_VALUE_LIST.add("46");
		HOLD_CURRENT_VALUE_LIST.add("91");
		HOLD_CURRENT_VALUE_LIST.add("137");
		HOLD_CURRENT_VALUE_LIST.add("183");
		HOLD_CURRENT_VALUE_LIST.add("228");
		HOLD_CURRENT_VALUE_LIST.add("274");
		HOLD_CURRENT_VALUE_LIST.add("320");
		HOLD_CURRENT_VALUE_LIST.add("365");
		HOLD_CURRENT_VALUE_LIST.add("411");
		HOLD_CURRENT_VALUE_LIST.add("457");
		HOLD_CURRENT_VALUE_LIST.add("502");
		HOLD_CURRENT_VALUE_LIST.add("548");
		HOLD_CURRENT_VALUE_LIST.add("594");
		HOLD_CURRENT_VALUE_LIST.add("639");
		HOLD_CURRENT_VALUE_LIST.add("685");
		HOLD_CURRENT_VALUE_LIST.add("731");
		
		U_STEP_RESOLUTION_VALUE_LIST.add("1");
		U_STEP_RESOLUTION_VALUE_LIST.add("2");
		U_STEP_RESOLUTION_VALUE_LIST.add("4");
		U_STEP_RESOLUTION_VALUE_LIST.add("8");
		U_STEP_RESOLUTION_VALUE_LIST.add("16");
		U_STEP_RESOLUTION_VALUE_LIST.add("32");
		U_STEP_RESOLUTION_VALUE_LIST.add("64");
		U_STEP_RESOLUTION_VALUE_LIST.add("128");
		U_STEP_RESOLUTION_VALUE_LIST.add("256");
		
		WAIT_TIME_VALUE_LIST.add("0");
		WAIT_TIME_VALUE_LIST.add("100");
		WAIT_TIME_VALUE_LIST.add("200");
		WAIT_TIME_VALUE_LIST.add("300");
		WAIT_TIME_VALUE_LIST.add("400");
		WAIT_TIME_VALUE_LIST.add("500");
		WAIT_TIME_VALUE_LIST.add("600");
		WAIT_TIME_VALUE_LIST.add("700");
		WAIT_TIME_VALUE_LIST.add("800");
		WAIT_TIME_VALUE_LIST.add("900");
	}
	
	
	public static void dimension() {
			
	}
	
}
